home *** CD-ROM | disk | FTP | other *** search
/ Freelog 125 / Freelog_MarsAvril2015_No125.iso / Musique / Quod Libet / quodlibet-3.3.0-installer.exe / bin / gi / overrides / GObject.pyc (.txt) < prev    next >
Python Compiled Bytecode  |  2014-12-31  |  22KB  |  708 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.7)
  3.  
  4. import sys
  5. import warnings
  6. from collections import namedtuple
  7. import gi.overrides as gi
  8. import gi.module as gi
  9. from gi.overrides import override
  10. from gi.repository import GLib
  11. from gi import PyGIDeprecationWarning
  12. from gi import _propertyhelper as propertyhelper
  13. from gi import _signalhelper as signalhelper
  14. _gobject = gi._gi._gobject
  15. GObjectModule = gi.module.get_introspection_module('GObject')
  16. __all__ = []
  17. from gi import _option as option
  18. sys.modules['gi._gobject.option'] = option
  19. for name in [
  20.     'markup_escape_text',
  21.     'get_application_name',
  22.     'set_application_name',
  23.     'get_prgname',
  24.     'set_prgname',
  25.     'main_depth',
  26.     'filename_display_basename',
  27.     'filename_display_name',
  28.     'filename_from_utf8',
  29.     'uri_list_extract_uris',
  30.     'MainLoop',
  31.     'MainContext',
  32.     'main_context_default',
  33.     'source_remove',
  34.     'Source',
  35.     'Idle',
  36.     'Timeout',
  37.     'PollFD',
  38.     'idle_add',
  39.     'timeout_add',
  40.     'timeout_add_seconds',
  41.     'io_add_watch',
  42.     'child_watch_add',
  43.     'get_current_time',
  44.     'spawn_async']:
  45.     globals()[name] = gi.overrides.deprecated(getattr(GLib, name), 'GLib.' + name)
  46.     __all__.append(name)
  47.  
  48. for name in [
  49.     'PRIORITY_DEFAULT',
  50.     'PRIORITY_DEFAULT_IDLE',
  51.     'PRIORITY_HIGH',
  52.     'PRIORITY_HIGH_IDLE',
  53.     'PRIORITY_LOW',
  54.     'IO_IN',
  55.     'IO_OUT',
  56.     'IO_PRI',
  57.     'IO_ERR',
  58.     'IO_HUP',
  59.     'IO_NVAL',
  60.     'IO_STATUS_ERROR',
  61.     'IO_STATUS_NORMAL',
  62.     'IO_STATUS_EOF',
  63.     'IO_STATUS_AGAIN',
  64.     'IO_FLAG_APPEND',
  65.     'IO_FLAG_NONBLOCK',
  66.     'IO_FLAG_IS_READABLE',
  67.     'IO_FLAG_IS_WRITEABLE',
  68.     'IO_FLAG_IS_SEEKABLE',
  69.     'IO_FLAG_MASK',
  70.     'IO_FLAG_GET_MASK',
  71.     'IO_FLAG_SET_MASK',
  72.     'SPAWN_LEAVE_DESCRIPTORS_OPEN',
  73.     'SPAWN_DO_NOT_REAP_CHILD',
  74.     'SPAWN_SEARCH_PATH',
  75.     'SPAWN_STDOUT_TO_DEV_NULL',
  76.     'SPAWN_STDERR_TO_DEV_NULL',
  77.     'SPAWN_CHILD_INHERITS_STDIN',
  78.     'SPAWN_FILE_AND_ARGV_ZERO',
  79.     'OPTION_FLAG_HIDDEN',
  80.     'OPTION_FLAG_IN_MAIN',
  81.     'OPTION_FLAG_REVERSE',
  82.     'OPTION_FLAG_NO_ARG',
  83.     'OPTION_FLAG_FILENAME',
  84.     'OPTION_FLAG_OPTIONAL_ARG',
  85.     'OPTION_FLAG_NOALIAS',
  86.     'OPTION_ERROR_UNKNOWN_OPTION',
  87.     'OPTION_ERROR_BAD_VALUE',
  88.     'OPTION_ERROR_FAILED',
  89.     'OPTION_REMAINING',
  90.     'glib_version']:
  91.     globals()[name] = getattr(GLib, name)
  92.     __all__.append(name)
  93.  
  94. G_MININT8 = GLib.MININT8
  95. G_MAXINT8 = GLib.MAXINT8
  96. G_MAXUINT8 = GLib.MAXUINT8
  97. G_MININT16 = GLib.MININT16
  98. G_MAXINT16 = GLib.MAXINT16
  99. G_MAXUINT16 = GLib.MAXUINT16
  100. G_MININT32 = GLib.MININT32
  101. G_MAXINT32 = GLib.MAXINT32
  102. G_MAXUINT32 = GLib.MAXUINT32
  103. G_MININT64 = GLib.MININT64
  104. G_MAXINT64 = GLib.MAXINT64
  105. G_MAXUINT64 = GLib.MAXUINT64
  106. __all__ += [
  107.     'G_MININT8',
  108.     'G_MAXINT8',
  109.     'G_MAXUINT8',
  110.     'G_MININT16',
  111.     'G_MAXINT16',
  112.     'G_MAXUINT16',
  113.     'G_MININT32',
  114.     'G_MAXINT32',
  115.     'G_MAXUINT32',
  116.     'G_MININT64',
  117.     'G_MAXINT64',
  118.     'G_MAXUINT64']
  119. for name in [
  120.     'G_MINFLOAT',
  121.     'G_MAXFLOAT',
  122.     'G_MINDOUBLE',
  123.     'G_MAXDOUBLE',
  124.     'G_MINSHORT',
  125.     'G_MAXSHORT',
  126.     'G_MAXUSHORT',
  127.     'G_MININT',
  128.     'G_MAXINT',
  129.     'G_MAXUINT',
  130.     'G_MINLONG',
  131.     'G_MAXLONG',
  132.     'G_MAXULONG',
  133.     'G_MAXSIZE',
  134.     'G_MINSSIZE',
  135.     'G_MAXSSIZE',
  136.     'G_MINOFFSET',
  137.     'G_MAXOFFSET']:
  138.     globals()[name] = getattr(_gobject, name)
  139.     __all__.append(name)
  140.  
  141. TYPE_INVALID = GObjectModule.type_from_name('invalid')
  142. TYPE_NONE = GObjectModule.type_from_name('void')
  143. TYPE_INTERFACE = GObjectModule.type_from_name('GInterface')
  144. TYPE_CHAR = GObjectModule.type_from_name('gchar')
  145. TYPE_UCHAR = GObjectModule.type_from_name('guchar')
  146. TYPE_BOOLEAN = GObjectModule.type_from_name('gboolean')
  147. TYPE_INT = GObjectModule.type_from_name('gint')
  148. TYPE_UINT = GObjectModule.type_from_name('guint')
  149. TYPE_LONG = GObjectModule.type_from_name('glong')
  150. TYPE_ULONG = GObjectModule.type_from_name('gulong')
  151. TYPE_INT64 = GObjectModule.type_from_name('gint64')
  152. TYPE_UINT64 = GObjectModule.type_from_name('guint64')
  153. TYPE_ENUM = GObjectModule.type_from_name('GEnum')
  154. TYPE_FLAGS = GObjectModule.type_from_name('GFlags')
  155. TYPE_FLOAT = GObjectModule.type_from_name('gfloat')
  156. TYPE_DOUBLE = GObjectModule.type_from_name('gdouble')
  157. TYPE_STRING = GObjectModule.type_from_name('gchararray')
  158. TYPE_POINTER = GObjectModule.type_from_name('gpointer')
  159. TYPE_BOXED = GObjectModule.type_from_name('GBoxed')
  160. TYPE_PARAM = GObjectModule.type_from_name('GParam')
  161. TYPE_OBJECT = GObjectModule.type_from_name('GObject')
  162. TYPE_PYOBJECT = GObjectModule.type_from_name('PyObject')
  163. TYPE_GTYPE = GObjectModule.type_from_name('GType')
  164. TYPE_STRV = GObjectModule.type_from_name('GStrv')
  165. TYPE_VARIANT = GObjectModule.type_from_name('GVariant')
  166. TYPE_GSTRING = GObjectModule.type_from_name('GString')
  167. TYPE_VALUE = GObjectModule.Value.__gtype__
  168. TYPE_UNICHAR = TYPE_UINT
  169. __all__ += [
  170.     'TYPE_INVALID',
  171.     'TYPE_NONE',
  172.     'TYPE_INTERFACE',
  173.     'TYPE_CHAR',
  174.     'TYPE_UCHAR',
  175.     'TYPE_BOOLEAN',
  176.     'TYPE_INT',
  177.     'TYPE_UINT',
  178.     'TYPE_LONG',
  179.     'TYPE_ULONG',
  180.     'TYPE_INT64',
  181.     'TYPE_UINT64',
  182.     'TYPE_ENUM',
  183.     'TYPE_FLAGS',
  184.     'TYPE_FLOAT',
  185.     'TYPE_DOUBLE',
  186.     'TYPE_STRING',
  187.     'TYPE_POINTER',
  188.     'TYPE_BOXED',
  189.     'TYPE_PARAM',
  190.     'TYPE_OBJECT',
  191.     'TYPE_PYOBJECT',
  192.     'TYPE_GTYPE',
  193.     'TYPE_STRV',
  194.     'TYPE_VARIANT',
  195.     'TYPE_GSTRING',
  196.     'TYPE_UNICHAR',
  197.     'TYPE_VALUE']
  198. Pid = GLib.Pid
  199. GError = GLib.GError
  200. OptionGroup = GLib.OptionGroup
  201. OptionContext = GLib.OptionContext
  202. __all__ += [
  203.     'Pid',
  204.     'GError',
  205.     'OptionGroup',
  206.     'OptionContext']
  207. PARAM_CONSTRUCT = GObjectModule.ParamFlags.CONSTRUCT
  208. PARAM_CONSTRUCT_ONLY = GObjectModule.ParamFlags.CONSTRUCT_ONLY
  209. PARAM_LAX_VALIDATION = GObjectModule.ParamFlags.LAX_VALIDATION
  210. PARAM_READABLE = GObjectModule.ParamFlags.READABLE
  211. PARAM_WRITABLE = GObjectModule.ParamFlags.WRITABLE
  212. PARAM_READWRITE = PARAM_READABLE | PARAM_WRITABLE
  213. __all__ += [
  214.     'PARAM_CONSTRUCT',
  215.     'PARAM_CONSTRUCT_ONLY',
  216.     'PARAM_LAX_VALIDATION',
  217.     'PARAM_READABLE',
  218.     'PARAM_WRITABLE',
  219.     'PARAM_READWRITE']
  220. SIGNAL_ACTION = GObjectModule.SignalFlags.ACTION
  221. SIGNAL_DETAILED = GObjectModule.SignalFlags.DETAILED
  222. SIGNAL_NO_HOOKS = GObjectModule.SignalFlags.NO_HOOKS
  223. SIGNAL_NO_RECURSE = GObjectModule.SignalFlags.NO_RECURSE
  224. SIGNAL_RUN_CLEANUP = GObjectModule.SignalFlags.RUN_CLEANUP
  225. SIGNAL_RUN_FIRST = GObjectModule.SignalFlags.RUN_FIRST
  226. SIGNAL_RUN_LAST = GObjectModule.SignalFlags.RUN_LAST
  227. __all__ += [
  228.     'SIGNAL_ACTION',
  229.     'SIGNAL_DETAILED',
  230.     'SIGNAL_NO_HOOKS',
  231.     'SIGNAL_NO_RECURSE',
  232.     'SIGNAL_RUN_CLEANUP',
  233.     'SIGNAL_RUN_FIRST',
  234.     'SIGNAL_RUN_LAST']
  235. GBoxed = _gobject.GBoxed
  236. GEnum = _gobject.GEnum
  237. GFlags = _gobject.GFlags
  238. GInterface = _gobject.GInterface
  239. GObject = _gobject.GObject
  240. GObjectWeakRef = _gobject.GObjectWeakRef
  241. GParamSpec = _gobject.GParamSpec
  242. GPointer = _gobject.GPointer
  243. GType = _gobject.GType
  244. Warning = _gobject.Warning
  245. __all__ += [
  246.     'GBoxed',
  247.     'GEnum',
  248.     'GFlags',
  249.     'GInterface',
  250.     'GObject',
  251.     'GObjectWeakRef',
  252.     'GParamSpec',
  253.     'GPointer',
  254.     'GType',
  255.     'Warning']
  256. features = _gobject.features
  257. list_properties = _gobject.list_properties
  258. new = _gobject.new
  259. pygobject_version = _gobject.pygobject_version
  260. threads_init = GLib.threads_init
  261. type_register = _gobject.type_register
  262. __all__ += [
  263.     'features',
  264.     'list_properties',
  265.     'new',
  266.     'pygobject_version',
  267.     'threads_init',
  268.     'type_register']
  269.  
  270. class Value(GObjectModule.Value):
  271.     
  272.     def __init__(self, value_type = None, py_value = None):
  273.         GObjectModule.Value.__init__(self)
  274.         if value_type is not None:
  275.             self.init(value_type)
  276.             if py_value is not None:
  277.                 self.set_value(py_value)
  278.             
  279.  
  280.     
  281.     def __del__(self):
  282.         if self._free_on_dealloc and self.g_type != TYPE_INVALID:
  283.             self.unset()
  284.         super(Value, self).__del__()
  285.  
  286.     
  287.     def set_boxed(self, boxed):
  288.         _gobject._gvalue_set(self, boxed)
  289.  
  290.     
  291.     def get_boxed(self):
  292.         return _gobject._gvalue_get(self)
  293.  
  294.     
  295.     def set_value(self, py_value):
  296.         gtype = self.g_type
  297.         if gtype == _gobject.TYPE_INVALID:
  298.             raise TypeError('GObject.Value needs to be initialized first')
  299.         if gtype == TYPE_BOOLEAN:
  300.             self.set_boolean(py_value)
  301.         elif gtype == TYPE_CHAR:
  302.             self.set_char(py_value)
  303.         elif gtype == TYPE_UCHAR:
  304.             self.set_uchar(py_value)
  305.         elif gtype == TYPE_INT:
  306.             self.set_int(py_value)
  307.         elif gtype == TYPE_UINT:
  308.             self.set_uint(py_value)
  309.         elif gtype == TYPE_LONG:
  310.             self.set_long(py_value)
  311.         elif gtype == TYPE_ULONG:
  312.             self.set_ulong(py_value)
  313.         elif gtype == TYPE_INT64:
  314.             self.set_int64(py_value)
  315.         elif gtype == TYPE_UINT64:
  316.             self.set_uint64(py_value)
  317.         elif gtype == TYPE_FLOAT:
  318.             self.set_float(py_value)
  319.         elif gtype == TYPE_DOUBLE:
  320.             self.set_double(py_value)
  321.         elif gtype == TYPE_STRING:
  322.             if isinstance(py_value, str):
  323.                 py_value = str(py_value)
  324.             elif sys.version_info < (3, 0):
  325.                 if isinstance(py_value, unicode):
  326.                     py_value = py_value.encode('UTF-8')
  327.                 else:
  328.                     raise ValueError('Expected string or unicode but got %s%s' % (py_value, type(py_value)))
  329.             raise ValueError('Expected string but got %s%s' % (py_value, type(py_value)))
  330.             self.set_string(py_value)
  331.         elif gtype == TYPE_PARAM:
  332.             self.set_param(py_value)
  333.         elif gtype.is_a(TYPE_ENUM):
  334.             self.set_enum(py_value)
  335.         elif gtype.is_a(TYPE_FLAGS):
  336.             self.set_flags(py_value)
  337.         elif gtype.is_a(TYPE_BOXED):
  338.             self.set_boxed(py_value)
  339.         elif gtype == TYPE_POINTER:
  340.             self.set_pointer(py_value)
  341.         elif gtype.is_a(TYPE_OBJECT):
  342.             self.set_object(py_value)
  343.         elif gtype == TYPE_UNICHAR:
  344.             self.set_uint(int(py_value))
  345.         elif gtype == TYPE_GTYPE:
  346.             self.set_gtype(py_value)
  347.         elif gtype == TYPE_VARIANT:
  348.             self.set_variant(py_value)
  349.         elif gtype == TYPE_PYOBJECT:
  350.             self.set_boxed(py_value)
  351.         else:
  352.             raise TypeError('Unknown value type %s' % gtype)
  353.  
  354.     
  355.     def get_value(self):
  356.         gtype = self.g_type
  357.         if gtype == TYPE_BOOLEAN:
  358.             return self.get_boolean()
  359.         if None == TYPE_CHAR:
  360.             return self.get_char()
  361.         if None == TYPE_UCHAR:
  362.             return self.get_uchar()
  363.         if None == TYPE_INT:
  364.             return self.get_int()
  365.         if None == TYPE_UINT:
  366.             return self.get_uint()
  367.         if None == TYPE_LONG:
  368.             return self.get_long()
  369.         if None == TYPE_ULONG:
  370.             return self.get_ulong()
  371.         if None == TYPE_INT64:
  372.             return self.get_int64()
  373.         if None == TYPE_UINT64:
  374.             return self.get_uint64()
  375.         if None == TYPE_FLOAT:
  376.             return self.get_float()
  377.         if None == TYPE_DOUBLE:
  378.             return self.get_double()
  379.         if None == TYPE_STRING:
  380.             return self.get_string()
  381.         if None == TYPE_PARAM:
  382.             return self.get_param()
  383.         if None.is_a(TYPE_ENUM):
  384.             return self.get_enum()
  385.         if None.is_a(TYPE_FLAGS):
  386.             return self.get_flags()
  387.         if None.is_a(TYPE_BOXED):
  388.             return self.get_boxed()
  389.         if None == TYPE_POINTER:
  390.             return self.get_pointer()
  391.         if None.is_a(TYPE_OBJECT):
  392.             return self.get_object()
  393.         if None == TYPE_UNICHAR:
  394.             return self.get_uint()
  395.         if None == TYPE_GTYPE:
  396.             return self.get_gtype()
  397.         if None == TYPE_VARIANT:
  398.             return self.get_variant()
  399.         if None == TYPE_PYOBJECT:
  400.             pass
  401.         else:
  402.             return None
  403.  
  404.     
  405.     def __repr__(self):
  406.         return '<Value (%s) %s>' % (self.g_type.name, self.get_value())
  407.  
  408.  
  409. Value = override(Value)
  410. __all__.append('Value')
  411.  
  412. def type_from_name(name):
  413.     type_ = GObjectModule.type_from_name(name)
  414.     if type_ == TYPE_INVALID:
  415.         raise RuntimeError('unknown type name: %s' % name)
  416.     return type_
  417.  
  418. __all__.append('type_from_name')
  419.  
  420. def type_parent(type_):
  421.     parent = GObjectModule.type_parent(type_)
  422.     if parent == TYPE_INVALID:
  423.         raise RuntimeError('no parent for type')
  424.     return parent
  425.  
  426. __all__.append('type_parent')
  427.  
  428. def _validate_type_for_signal_method(type_):
  429.     if hasattr(type_, '__gtype__'):
  430.         type_ = type_.__gtype__
  431.     if not type_.is_instantiatable() and not type_.is_interface():
  432.         raise TypeError('type must be instantiable or an interface, got %s' % type_)
  433.  
  434.  
  435. def signal_list_ids(type_):
  436.     _validate_type_for_signal_method(type_)
  437.     return GObjectModule.signal_list_ids(type_)
  438.  
  439. __all__.append('signal_list_ids')
  440.  
  441. def signal_list_names(type_):
  442.     ids = signal_list_ids(type_)
  443.     return tuple((lambda .0: pass)(ids))
  444.  
  445. __all__.append('signal_list_names')
  446.  
  447. def signal_lookup(name, type_):
  448.     _validate_type_for_signal_method(type_)
  449.     return GObjectModule.signal_lookup(name, type_)
  450.  
  451. __all__.append('signal_lookup')
  452. SignalQuery = namedtuple('SignalQuery', [
  453.     'signal_id',
  454.     'signal_name',
  455.     'itype',
  456.     'signal_flags',
  457.     'return_type',
  458.     'param_types'])
  459.  
  460. def signal_query(id_or_name, type_ = None):
  461.     if type_ is not None:
  462.         id_or_name = signal_lookup(id_or_name, type_)
  463.     res = GObjectModule.signal_query(id_or_name)
  464.     if res is None:
  465.         return None
  466.     if None.signal_id == 0:
  467.         return None
  468.     return None(res.signal_id, res.signal_name, res.itype, res.signal_flags, res.return_type, tuple(res.param_types))
  469.  
  470. __all__.append('signal_query')
  471.  
  472. class _HandlerBlockManager(object):
  473.     
  474.     def __init__(self, obj, handler_id):
  475.         self.obj = obj
  476.         self.handler_id = handler_id
  477.  
  478.     
  479.     def __enter__(self):
  480.         pass
  481.  
  482.     
  483.     def __exit__(self, exc_type, exc_value, traceback):
  484.         GObjectModule.signal_handler_unblock(self.obj, self.handler_id)
  485.  
  486.  
  487.  
  488. def signal_handler_block(obj, handler_id):
  489.     '''Blocks the signal handler from being invoked until
  490.     handler_unblock() is called.
  491.  
  492.     :param GObject.Object obj:
  493.         Object instance to block handlers for.
  494.     :param int handler_id:
  495.         Id of signal to block.
  496.     :returns:
  497.         A context manager which optionally can be used to
  498.         automatically unblock the handler:
  499.  
  500.     .. code-block:: python
  501.  
  502.         with GObject.signal_handler_block(obj, id):
  503.             pass
  504.     '''
  505.     GObjectModule.signal_handler_block(obj, handler_id)
  506.     return _HandlerBlockManager(obj, handler_id)
  507.  
  508. __all__.append('signal_handler_block')
  509.  
  510. def signal_parse_name(detailed_signal, itype, force_detail_quark):
  511.     '''Parse a detailed signal name into (signal_id, detail).
  512.  
  513.     :param str detailed_signal:
  514.         Signal name which can include detail.
  515.         For example: "notify:prop_name"
  516.     :returns:
  517.         Tuple of (signal_id, detail)
  518.     :raises ValueError:
  519.         If the given signal is unknown.
  520.     '''
  521.     (res, signal_id, detail) = GObjectModule.signal_parse_name(detailed_signal, itype, force_detail_quark)
  522.     if res:
  523.         return (signal_id, detail)
  524.     raise None('%s: unknown signal name: %s' % (itype, detailed_signal))
  525.  
  526. __all__.append('signal_parse_name')
  527.  
  528. def remove_emission_hook(obj, detailed_signal, hook_id):
  529.     (signal_id, detail) = signal_parse_name(detailed_signal, obj, True)
  530.     GObjectModule.signal_remove_emission_hook(signal_id, hook_id)
  531.  
  532. __all__.append('remove_emission_hook')
  533.  
  534. def signal_accumulator_first_wins(ihint, return_accu, handler_return, user_data = None):
  535.     return (False, handler_return)
  536.  
  537. __all__.append('signal_accumulator_first_wins')
  538.  
  539. def signal_accumulator_true_handled(ihint, return_accu, handler_return, user_data = None):
  540.     return (not handler_return, handler_return)
  541.  
  542. __all__.append('signal_accumulator_true_handled')
  543. add_emission_hook = _gobject.add_emission_hook
  544. signal_new = _gobject.signal_new
  545. __all__ += [
  546.     'add_emission_hook',
  547.     'signal_new']
  548.  
  549. class _FreezeNotifyManager(object):
  550.     
  551.     def __init__(self, obj):
  552.         self.obj = obj
  553.  
  554.     
  555.     def __enter__(self):
  556.         pass
  557.  
  558.     
  559.     def __exit__(self, exc_type, exc_value, traceback):
  560.         self.obj.thaw_notify()
  561.  
  562.  
  563.  
  564. def _signalmethod(func):
  565.     
  566.     def meth(*args, **kwargs):
  567.         return func(*args, **kwargs)
  568.  
  569.     meth = (gi.overrides.wraps(func),)(meth)
  570.     return meth
  571.  
  572.  
  573. class Object(GObjectModule.Object):
  574.     
  575.     def _unsupported_method(self, *args, **kargs):
  576.         raise RuntimeError('This method is currently unsupported.')
  577.  
  578.     
  579.     def _unsupported_data_method(self, *args, **kargs):
  580.         raise RuntimeError('Data access methods are unsupported. Use normal Python attributes instead')
  581.  
  582.     get_data = _unsupported_data_method
  583.     get_qdata = _unsupported_data_method
  584.     set_data = _unsupported_data_method
  585.     steal_data = _unsupported_data_method
  586.     steal_qdata = _unsupported_data_method
  587.     replace_data = _unsupported_data_method
  588.     replace_qdata = _unsupported_data_method
  589.     bind_property_full = _unsupported_method
  590.     compat_control = _unsupported_method
  591.     interface_find_property = _unsupported_method
  592.     interface_install_property = _unsupported_method
  593.     interface_list_properties = _unsupported_method
  594.     notify_by_pspec = _unsupported_method
  595.     run_dispose = _unsupported_method
  596.     watch_closure = _unsupported_method
  597.     _ref = GObjectModule.Object.ref
  598.     _ref_sink = GObjectModule.Object.ref_sink
  599.     _unref = GObjectModule.Object.unref
  600.     _force_floating = GObjectModule.Object.force_floating
  601.     ref = _unsupported_method
  602.     ref_sink = _unsupported_method
  603.     unref = _unsupported_method
  604.     force_floating = _unsupported_method
  605.     get_property = _gobject.GObject.get_property
  606.     get_properties = _gobject.GObject.get_properties
  607.     set_property = _gobject.GObject.set_property
  608.     set_properties = _gobject.GObject.set_properties
  609.     bind_property = _gobject.GObject.bind_property
  610.     connect = _gobject.GObject.connect
  611.     connect_after = _gobject.GObject.connect_after
  612.     connect_object = _gobject.GObject.connect_object
  613.     connect_object_after = _gobject.GObject.connect_object_after
  614.     disconnect_by_func = _gobject.GObject.disconnect_by_func
  615.     handler_block_by_func = _gobject.GObject.handler_block_by_func
  616.     handler_unblock_by_func = _gobject.GObject.handler_unblock_by_func
  617.     emit = _gobject.GObject.emit
  618.     chain = _gobject.GObject.chain
  619.     weak_ref = _gobject.GObject.weak_ref
  620.     __copy__ = _gobject.GObject.__copy__
  621.     __deepcopy__ = _gobject.GObject.__deepcopy__
  622.     
  623.     def freeze_notify(self):
  624.         '''Freezes the object\'s property-changed notification queue.
  625.  
  626.         :returns:
  627.             A context manager which optionally can be used to
  628.             automatically thaw notifications.
  629.  
  630.         This will freeze the object so that "notify" signals are blocked until
  631.         the thaw_notify() method is called.
  632.  
  633.         .. code-block:: python
  634.  
  635.             with obj.freeze_notify():
  636.                 pass
  637.         '''
  638.         super(Object, self).freeze_notify()
  639.         return _FreezeNotifyManager(self)
  640.  
  641.     
  642.     def connect_data(self, detailed_signal, handler, *data, **kwargs):
  643.         '''Connect a callback to the given signal with optional user data.
  644.  
  645.         :param str detailed_signal:
  646.             A detailed signal to connect to.
  647.         :param callable handler:
  648.             Callback handler to connect to the signal.
  649.         :param *data:
  650.             Variable data which is passed through to the signal handler.
  651.         :param GObject.ConnectFlags connect_flags:
  652.             Flags used for connection options.
  653.         :returns:
  654.             A signal id which can be used with disconnect.
  655.         '''
  656.         flags = kwargs.get('connect_flags', 0)
  657.         if flags & GObjectModule.ConnectFlags.AFTER:
  658.             connect_func = _gobject.GObject.connect_after
  659.         else:
  660.             connect_func = _gobject.GObject.connect
  661.         return connect_func(self, detailed_signal, new_handler, *data)
  662.  
  663.     handler_block = signal_handler_block
  664.     handler_unblock = _signalmethod(GObjectModule.signal_handler_unblock)
  665.     disconnect = _signalmethod(GObjectModule.signal_handler_disconnect)
  666.     handler_disconnect = _signalmethod(GObjectModule.signal_handler_disconnect)
  667.     handler_is_connected = _signalmethod(GObjectModule.signal_handler_is_connected)
  668.     stop_emission_by_name = _signalmethod(GObjectModule.signal_stop_emission_by_name)
  669.     
  670.     def stop_emission(self, detailed_signal):
  671.         '''Deprecated, please use stop_emission_by_name.'''
  672.         warnings.warn(self.stop_emission.__doc__, PyGIDeprecationWarning, stacklevel = 2)
  673.         return self.stop_emission_by_name(detailed_signal)
  674.  
  675.     emit_stop_by_name = stop_emission
  676.  
  677. Object = override(Object)
  678. GObject = Object
  679. __all__ += [
  680.     'Object',
  681.     'GObject']
  682.  
  683. class Binding(GObjectModule.Binding):
  684.     
  685.     def __call__(self):
  686.         warnings.warn('Using parentheses (binding()) to retrieve the Binding object is no longer needed because the binding is returned directly from "bind_property.', PyGIDeprecationWarning, stacklevel = 2)
  687.         return self
  688.  
  689.     
  690.     def unbind(self):
  691.         if hasattr(self, '_unbound'):
  692.             raise ValueError('binding has already been cleared out')
  693.         setattr(self, '_unbound', True)
  694.         super(Binding, self).unbind()
  695.  
  696.  
  697. Binding = override(Binding)
  698. __all__.append('Binding')
  699. Property = propertyhelper.Property
  700. Signal = signalhelper.Signal
  701. SignalOverride = signalhelper.SignalOverride
  702. property = Property
  703. __all__ += [
  704.     'Property',
  705.     'Signal',
  706.     'SignalOverride',
  707.     'property']
  708.